<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增信件延期申请')"/>
    <!--<th:block th:include="include :: select2-css" />-->
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">

    <style>
        label {
            font-weight: bold;
        }

        @font-face {
            font-family: 'huawen';
            src: url("/fonts/huawen.woff2");
        }
    </style>
</head>

<body style="background-color: #F4F6FA;font-size: 13px;font-family:'huawen' ;font-weight: bold">
<div class="main-content" style="margin: 0;padding: 0">

    <form id="form-user-add" class="form-horizontal" style="background-color: #F4F6FA">
        <input type="hidden" name="wfId" th:value="${wfId}">
        <input type="hidden" name="sendId" th:value="${sendId}">
        <input type="hidden" name="suserNo" th:value="${mwfSendBack.suserNo}"/>
        <input type="hidden" name="suserName" th:value="${mwfSendBack.suserName}"/>
        <input type="hidden" name="fkint" value="0">
        <input type="hidden" name="flagInt" value="0">
        <input type="hidden" name="flagString" value>
        <input type="hidden" name="spareInt" value="0">
        <input type="hidden" name="spareString" value>
        <input type="hidden" name="checkTime" value>
        <input type="hidden" name="chkUserNo" value>
        <input type="hidden" name="chkUserName" value>
        <input type="hidden" name="chkDesc" value>
        <input type="hidden" name="chkRemark" value>
        <div class="col-sm-12" style="display: flex">
            <div class="col-sm-12 entering-page">
                <!--    延期申请    -->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">新增延期申请</h4>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">工单编号：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[${mmailWorkForm.workFormNo}]]</span>
                            <input type="hidden" name="workFormNo" th:value="${mmailWorkForm.workFormNo}">
                        </div>
                        <label class="col-sm-2 control-label entering-pd">来自单位：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[${mwfSendBack.sdeptName}]]</span>
                            <input type="hidden" name="sdeptName" th:value="${mwfSendBack.sdeptName}" />
                            <input type="hidden" name="sdeptId" th:value="${mwfSendBack.sdeptId}"/>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">工单主题：</label>
                        <div class="col-sm-8">
                            <span class="tworkformprocess-span">[[${mmailWorkForm.fromTopic}]]</span>
                            <!--                            <input type="text" th:value="${mmailWorkForm.fromTopic}" class="form-control" readonly UNSELECTABLE="on">-->
                        </div>
                    </div>
                </div>
                <!--内容描述：-->
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">内容描述：</label>
                        <div class="col-sm-8">
                            <textarea maxlength="3500"
                                      class="form-control workRemark"
                                      rows="3" style="height: 160px" readonly UNSELECTABLE="on">[[${mmailWorkForm.fmContent}]]</textarea>
                        </div>
                    </div>
                </div>
                <!--办理要求-->
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">办理要求：</label>
                        <div class="col-sm-8">
                            <textarea maxlength="3500"
                                      class="form-control workRemark"
                                      rows="3" style="height: 80px" readonly UNSELECTABLE="on">[[${mwfSendBack.sendDesc}]] </textarea>
                            <!--                            <input type="text" th:field="${mwfSendBack.sendDesc}" class="form-control"-->
                            <!--                                   readonly UNSELECTABLE="on">-->
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd">申请单位：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[${mwfSendBack.sbdeptName}]]</span>
                            <input type="hidden" name="adeptNo" th:value="${mwfSendBack.sbdeptId}"/>
                            <input type="hidden" name="adeptName" th:value="${mwfSendBack.sbdeptName}"/>
                        </div>
                        <label class="col-sm-2 control-label entering-pd">申请人：</label>
                        <div class="col-sm-3">
                            <span class="tworkformprocess-span">[[${user.userName}]]</span>
                            <input type="hidden" name="auserNo" th:value="${user.userNo}"/>
                            <input type="hidden" name="auserName" th:value="${user.userName}"/>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd" style="color: #FF812E">原办理期限：</label>
                        <div class="col-sm-2">
                            <span class="tworkformprocess-span">[[${#dates.format(mwfSendBack.backLimit,'yyyy-MM-dd HH:mm:ss')}]]</span>
                            <input type="hidden" name="limitOld" th:value="${#dates.format(mwfSendBack.backLimit,'yyyy-MM-dd HH:mm:ss')}"/>
                        </div>
                        <label class="col-sm-2 control-label entering-pd" style="color: #FF1A0B">延期至：</label>
                        <div class="col-sm-3">
                            <input type="text" name="delayTo" th:value="${@commonServiceImpl.nextXWorkdayGet(#dates.format(mwfSendBack.backLimit,'yyyy-MM-dd'))}" class="form-control postpone"
                                   id="postpone"
                                   placeholder="请输入时间">
                            <div class="input-group-append entering-pd" style="position: absolute;top: 12px;right: 30px;">
                                <span class="glyphicon glyphicon-calendar"></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-sm-3 control-label entering-pd" style="color: red">延期理由：</label>
                        <div class="col-sm-4">
                            <select name="delayRc" id="delayRc"
                                    th:with="delayRn=${@commonServiceImpl.delayReasonList()}"
                                    onchange="dropChgSendTextOnly(this,'delayRn');"
                                    class="form-control m-b phoneCategory">
                                <th:block th:each="item : ${delayRn}">
                                    <option th:text="${item['CSText']}" th:value="${item['CSValue']}"></option>
                                </th:block>
                            </select>
                            <textarea id="delayRn" name="delayRn" maxlength="3500"
                                      class="form-control opinion"
                                      rows="3"
                                      style="height: 130px" required="required"></textarea>
                        </div>
                        <!--按钮-->
                        <div class="col-sm-2" style="display: flex;justify-content: center;padding-top: 7%;">
                            <div class="col-sm-3" style="display: flex;justify-content: space-evenly;margin-left: 200px">
                                <input type="hidden" name="deferState" id="deferState" value="10">
                                <button type="button" class="btn btn-sm btn-success" onclick="sub()">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <button type="button" class="btn btn-sm btn-light" onclick="closeItem()">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </form>
</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>
<script th:src="@{/js/extension.js}"></script>

<script>
    var prefix = ctx + "system/mInterior";
    function sub(){
        if ($.validate.form()) {
            let data = $('#form-user-add').serializeArray();
            $.operate.saveTab(prefix + "/cmnFile/mwfDeferAddJson",data);
        }
    }
</script>
</body>
</html>

